package cn.wolfcode.luowowo2.common.query;

import cn.wolfcode.luowowo2.common.util.TravelCondition;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Albert on 2019/7/8.
 */
@Getter
@Setter
public class TravelQueryObject extends QueryObject {
    private Long destId;
    private Integer orderType = -1;
    private Integer travelTimeType;
    private Integer perExpendType;
    private Integer dayType;

    private TravelCondition days;
    public TravelCondition getDays(){
        return TravelCondition.DAY_TYPE.get(dayType);
    }

    private TravelCondition travelTime;
    public TravelCondition getTravelTime(){
        return TravelCondition.TRAVLE_MONTH.get(travelTimeType);
    }

    private TravelCondition perExpends;
    public TravelCondition getPerExpends(){
        return TravelCondition.PER_EXPAND_TYPE.get(perExpendType);
    }

    public String getOrderString(){
        if(orderType==2){
            return "viewnum DESC";
        }else {
            return "travelTime DESC";
        }
    }


}
